<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>选择试卷</title>
    <script type="text/javascript" src="${pageContext.request.contextPath}/bootstrap/js/jQuery.js"></script>
    <script type="text/javascript">
        function checkForm() {
            var paperId = $('#id').val();
            if(paperId == ""){
                alert("请选择考试试卷！");
                return false;
            }
            return true;
        }
    </script>
</head>
<body>
<div class="data_list">
    <div class="data_content">
        <form method="post" onsubmit="return checkForm()" action="${pageContext.request.contextPath}/paperAction!getPaperById">
            <table width="40%" align="center">
                <tr>
                    <td>
                        <strong>请选择试卷进行考试！</strong>
                    </td>
                    <td>
                        <select  id="id" name="id">
                            <option value="">请选择....</option>
                            <c:forEach var="paper" items="${paperList }">
                                <option value="${paper.id }">${paper.name }</option>
                            </c:forEach>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">&nbsp;</td>
                </tr>
                <tr>
                    <td><input type="submit" class="btn btn-primary" value="确定"></td>
                    <td><input type="button" class="btn btn-primary" value="返回" onclick="history.back()"></td>
                </tr>
            </table>
        </form>
    </div>
</div>
</body>
</html>